package main

import "fmt"

func main() {

	fmt.Println("golang map operation")

	m := map[string]string{
		"name":    "Tom",
		"age":     "28",
		"phone":   "8952000",
		"address": "USA",
	}
	m1 := make(map[string]int)

	fmt.Println(m)
	fmt.Println(m1)

	fmt.Println("map get operation")

	v1 := m["name"]

	fmt.Println("Key-->name", v1)

	for k, v := range m {
		fmt.Println(k, v)
	}

	name, ok := m["name"]
	fmt.Println(name, ok)

	if sName, ok := m["maaa"]; ok {
		fmt.Println(sName)
	}

	delete(m, "name")

	name, ok = m["name"]
	fmt.Println(name, ok)
}
